<?php
namespace app\common\model;

use think\Model;

/**  YSF
 *   工程人员业绩 模型
 *   Date: 2019/4/16
 * Class OaEngineersPerformanceModel
 * @package app\common\model
 */
class OaEngineersPerformanceModel extends Model
{
    // 表名
    protected $name = 'oa_engineers_performance';

    // 单条查询
    public function getOne($where=[],$field='*',$join=[])
    {
        $result = $this->alias('a')->where($where)->join($join)
                ->field($field)
                ->find();
        return $result;
    }

    // 连表分组查询
    public function getJoinGroupAll($where=[],$field='*',$join=[],$group=[],$page=1,$pageSize=99999999,$order='')
    {
        $result = $this->alias('a')
                    ->where($where)
                    ->join($join)
                    ->group($group)
                    ->field($field)
                    ->page($page, $pageSize)
                    ->order($order)
                    ->select();
        return $result;
    }







}